$(function () {
    $.ajax({
        url: "/seven",
        type: "post",
        dataType:"json",
        success: function (data) {
            echarts_3(data.datas);

        }
    });
});

function echarts_3(datat) {
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('echarts_3'));
    var dataAxis = [];
    var data = [];
    //data = datat;
    $(datat).each(function (k, v) {
        dataAxis.push(v.city);
        data.push(v.count);
        alert(datat)
        alert(data)
    });
var app = {};
option = null;
option = {
    xAxis: {
        type: 'category',
        data: dataAxis
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        data: data,
        type: 'line',
        symbol: 'triangle',
        symbolSize: 20,
        lineStyle: {
            color: 'green',
            width: 4,
            type: 'dashed'
        },
        itemStyle: {
            borderWidth: 3,
            borderColor: 'yellow',
            color: 'blue'
        }
    }]
};

if (option && typeof option === "object") {
    myChart.setOption(option, true);
}}